<%= form_for(@team) do |f| %>
  <% if @team.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@team.errors.count, "error") %> prohibited this team from being saved:</h2>

      <ul>
      <% @team.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :name %><br />
    <%= f.text_field :name %>
  </div>
  <div class="field">
    <%= f.label :logo %><br />
    <%= f.text_field :logo %>
  </div>
  <div class="field">
    <%= f.label :points %><br />
    <%= f.text_field :points %>
  </div>
  <div class="field">
    <%= f.label :wins %><br />
    <%= f.text_field :wins %>
  </div>
  <div class="field">
    <%= f.label :losses %><br />
    <%= f.text_field :losses %>
  </div>
  <div class="field">
    <%= f.label :otl %><br />
    <%= f.text_field :otl %>
  </div>
  <div class="field">
    <%= f.label :shots %><br />
    <%= f.text_field :shots %>
  </div>
  <div class="field">
    <%= f.label :ppg %><br />
    <%= f.text_field :ppg %>
  </div>
  <div class="field">
    <%= f.label :user_id %><br />
    <% users_array = User.all.map { |u| [u.username, u.id] } %>
	<%= f.select(:user_id, users_array)%>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
